package com.seanLab.repository;

import com.seanLab.domain.SpecialImage;
import com.seanLab.domain.TagInfo;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import java.util.List;

public interface SpecialImageRepo extends MongoRepository<SpecialImage, String> {
    public SpecialImage findByImgID(String imgID);

    @Query("{'imgTagList':{$exists:true}, $and:[{'esFlag': 0}]}")
    public List<SpecialImage> findTop10000ByImgTagListAndEsFlag(List<TagInfo> imgTagList, Pageable pageable);
}
